Component({
  data: {
    tableDatas: [
      {
        id: "1",
        name: "张三",
        sex: "男",
        age: 28,
        address: "北京市朝阳区北土城东路芍药居小区芍药居里2号院",
        phone: "18343457584"
      },
      {
        id: "2",
        name: "李四",
        sex: "男",
        age: 27,
        address: "北京市岳麓区枫林三路卫星大厦",
        phone: "18354789444"
      },
      {
        id: "3",
        name: "小红",
        sex: "女",
        age: 23,
        address: "上海浦东新区翻斗花园2号1001室",
        phone: "14358936584"
      }
    ]
  },
  methods: {
    radioChangeHandle(e) {
      let selectId = e.detail.value;
      let result = this.data.tableDatas.find((item) => {
        if (item.id === selectId) {
          return true;
        }
      });
      // console.log(result)

      wx.showModal({
        title: '提示',
        content: `${result.id}-${result.name}-${result.phone}`,
        complete: (res) => {
          if (res.cancel) {
            // cancel: todo what you want
          }
      
          if (res.confirm) {
            // confirm: todo what you want
          }
        }
      });
    }
  }
});